<template>
  <div class="headPreviewContainer">
    <el-card class="box-card"
             shadow="never">

      <div class="applicationInfo">
        <div class="Divider">
          <img class="imgIcon"
               src="../../../../assets/Group 3169.png"
               alt="">
          <div class="countUp"><vue-count-up :options="countUpOptions"
                          :end-val="getUserHeaderDate.canCashWithdrawal?getUserHeaderDate.canCashWithdrawal:'0'" /></div>
          <!-- <div>{{ getUserHeaderDate.canCashWithdrawal?getUserHeaderDate.canCashWithdrawal:'0' }}</div> -->
          <span class="jiner">待提现金额</span>
        </div>
        <div class="Divider">
          <img src="../../../../assets/Group 3168.png"
               alt="">
          <div class="countUp"><vue-count-up :options="countUpOptions"
                          :end-val="getUserHeaderDate.unaudited?getUserHeaderDate.unaudited:'0'" /></div>
          <span class="jiner">待审核金额</span>

        </div>
        <div class="Divider">
          <img src="../../../../assets/Group 3167.png"
               alt="">
          <div class="countUp"><vue-count-up :options="countUpOptions"
                          :end-val="getUserHeaderDate.audited?getUserHeaderDate.audited:'0'" /></div>
          <span class="jiner">已打款金额</span>

        </div>
        <div class="Divider"
             style="border-right: none">
          <img src="../../../../assets/Group 3166.png"
               alt="">
          <div class="countUp"><vue-count-up :options="countUpOptions"
                          :end-val="getUserHeaderDate.turnDown?getUserHeaderDate.turnDown:'0'" /></div>
          <span class="jiner">已驳回金额</span>
        </div>
      </div>
    </el-card>
  </div>
</template>
	
<script>
import VueCountUp from 'vue-countup-v2';
import { getUserHeaderDate } from '@/api/distributionWithdrawal/index'
export default {
  name: 'headPreview',
  data () {
    return {
      getUserHeaderDate: {},
      countUpOptions: {
        useEasing: true,
        useGrouping: true,
        separator: ',',
        decimal: '.',
        decimalPlaces: 2,
        prefix: '',
        suffix: ''
      },

    };
  },
  activated () {
    this.queryHeader()
  },
  components: {
    VueCountUp
  },
  methods: {
    async queryHeader () {
      const res = await getUserHeaderDate({
        siteId: this.$store.state.site.info.id
      })
      console.log(res)
      this.getUserHeaderDate = res
    }
  }
};

</script>
<style lang="less" scoped>
.headPreviewContainer {
  padding-bottom: 15px;
  .applicationInfo {
    display: flex;
    align-items: center;
    justify-content: center;
    .jiner {
      color: #757575;
      font-size: 18px;
    }

    .Divider {
      text-align: center;
      width: 30%;

      border-right: 1px solid #ebebeb;
      .imgIcon {
        width: 50px;
        height: 50px;
        border-radius: 50%;
      }
      .jiner {
        color: #999;
        font-family: Inter;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: normal;
      }
    }

    .countUp {
      margin: 3px 0 3px 0;
      color: #000;
      font-weight: 500;
      font-size: 28px;
    }
  }
}
</style>
	